#include "IntevalTree.h"
int main()
{
  BinaryTree<double> A;
  A.rbinsert(2.0,3.5);
  A.rbinsert(1.2,3.2);
  A.rbinsert(1.0,4.0);
  A.rbinsert(1.5,5.2);
  A.rbinsert(2.5,3.0);
  A.rbinsert(2.2,3.4);
  A.rbinsert(5.0,6.0);
  std::cout << "["<< A.intervalsearch(5.3,5.5)->low << ","<<A.intervalsearch(5.3,5.5)->high << "]" << std::endl;
  std::cout <<"max = "<< A.intervalsearch(5.3,5.5)->max<<std::endl;
   std::cout << "["<< A.intervalsearch(4.1,5.5)->low << ","<<A.intervalsearch(4.1,5.5)->high << "]" << std::endl;
  std::cout <<"max = "<< A.intervalsearch(4.1,5.5)->max<<std::endl;
  return 0;
}
